package com.example.myactspringboot.controller;

import com.example.myactspringboot.server.TemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author Zhouchb
 * @Create 2024-04-10 20:58
 * @Description
 */
@RestController
public class TemplateExport {

    @Autowired
    private TemplateService service;

    @GetMapping(value = "/templateExport",produces = "application/json;charset=UTF-8")
    public void export(HttpServletResponse response) throws IOException {
        service.templateExport(response);
//        service.download("response",response);
    }
}
